.class public Lcom/zuiapps/suite/utils/string/StringUtils;
.super Ljava/lang/Object;
.source "StringUtils.java"


# static fields
.field private static final dateFormater:Ljava/text/SimpleDateFormat;

.field private static final dateFormater2:Ljava/text/SimpleDateFormat;

.field private static final emailer:Ljava/util/regex/Pattern;


# direct methods
.method static constructor <clinit>()V
    .registers 2

    .prologue
    .line 24
    const-string v0, "\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"

    invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;

    move-result-object v0

    sput-object v0, Lcom/zuiapps/suite/utils/string/StringUtils;->emailer:Ljava/util/regex/Pattern;

    .line 25
    new-instance v0, Ljava/text/SimpleDateFormat;

    const-string v1, "yyyy-MM-dd HH:mm:ss"

    invoke-direct {v0, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    sput-object v0, Lcom/zuiapps/suite/utils/string/StringUtils;->dateFormater:Ljava/text/SimpleDateFormat;

    .line 26
    new-instance v0, Ljava/text/SimpleDateFormat;

    const-string v1, "yyyy-MM-dd"

    invoke-direct {v0, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    sput-object v0, Lcom/zuiapps/suite/utils/string/StringUtils;->dateFormater2:Ljava/text/SimpleDateFormat;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

    .prologue
    .line 23
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static copyToClipboard(Ljava/lang/String;Landroid/content/Context;)V
    .registers 6
    .param p0, "content"    # Ljava/lang/String;
    .param p1, "context"    # Landroid/content/Context;
    .annotation build Landroid/annotation/TargetApi;
        value = 0xb
    .end annotation

    .prologue
    .line 214
    sget v2, Landroid/os/Build$VERSION;->SDK_INT:I

    .line 215
    .local v2, "currentapiVersion":I
    const/16 v3, 0xb

    if-lt v2, v3, :cond_18

    .line 216
    const-string v3, "clipboard"

    invoke-virtual {p1, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/content/ClipboardManager;

    .line 217
    .local v1, "clipboard":Landroid/content/ClipboardManager;
    const-string v3, "label"

    invoke-static {v3, p0}, Landroid/content/ClipData;->newPlainText(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Landroid/content/ClipData;

    move-result-object v0

    .line 218
    .local v0, "clip":Landroid/content/ClipData;
    invoke-virtual {v1, v0}, Landroid/content/ClipboardManager;->setPrimaryClip(Landroid/content/ClipData;)V

    .line 223
    .end local v0    # "clip":Landroid/content/ClipData;
    .end local v1    # "clipboard":Landroid/content/ClipboardManager;
    :goto_17
    return-void

    .line 220
    :cond_18
    const-string v3, "clipboard"

    invoke-virtual {p1, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/text/ClipboardManager;

    .line 221
    .local v1, "clipboard":Landroid/text/ClipboardManager;
    invoke-virtual {v1, p0}, Landroid/text/ClipboardManager;->setText(Ljava/lang/CharSequence;)V

    goto :goto_17
.end method

.method public static friendlyTime(Ljava/lang/String;)Ljava/lang/String;
    .registers 17
    .param p0, "sdate"    # Ljava/lang/String;

    .prologue
    .line 51
    invoke-static/range {p0 .. p0}, Lcom/zuiapps/suite/utils/string/StringUtils;->toDate(Ljava/lang/String;)Ljava/util/Date;

    move-result-object v10

    .line 52
    .local v10, "time":Ljava/util/Date;
    if-nez v10, :cond_9

    .line 53
    const-string v5, "Unknown"

    .line 88
    :cond_8
    :goto_8
    return-object v5

    .line 55
    :cond_9
    const-string v5, ""

    .line 56
    .local v5, "ftime":Ljava/lang/String;
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v0

    .line 59
    .local v0, "cal":Ljava/util/Calendar;
    sget-object v11, Lcom/zuiapps/suite/utils/string/StringUtils;->dateFormater2:Ljava/text/SimpleDateFormat;

    invoke-virtual {v0}, Ljava/util/Calendar;->getTime()Ljava/util/Date;

    move-result-object v12

    invoke-virtual {v11, v12}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v1

    .line 60
    .local v1, "curDate":Ljava/lang/String;
    sget-object v11, Lcom/zuiapps/suite/utils/string/StringUtils;->dateFormater2:Ljava/text/SimpleDateFormat;

    invoke-virtual {v11, v10}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v7

    .line 61
    .local v7, "paramDate":Ljava/lang/String;
    invoke-virtual {v1, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v11

    if-eqz v11, :cond_70

    .line 62
    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v12

    invoke-virtual {v10}, Ljava/util/Date;->getTime()J

    move-result-wide v14

    sub-long/2addr v12, v14

    const-wide/32 v14, 0x36ee80

    div-long/2addr v12, v14

    long-to-int v6, v12

    .line 63
    .local v6, "hour":I
    if-nez v6, :cond_5c

    .line 64
    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v12

    invoke-virtual {v10}, Ljava/util/Date;->getTime()J

    move-result-wide v14

    sub-long/2addr v12, v14

    const-wide/32 v14, 0xea60

    div-long/2addr v12, v14

    const-wide/16 v14, 0x1

    invoke-static {v12, v13, v14, v15}, Ljava/lang/Math;->max(JJ)J

    move-result-wide v12

    invoke-virtual {v11, v12, v13}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "\u5206\u949f\u524d"

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    goto :goto_8

    .line 66
    :cond_5c
    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v11, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "\u5c0f\u65f6\u524d"

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    goto :goto_8

    .line 70
    .end local v6    # "hour":I
    :cond_70
    invoke-virtual {v10}, Ljava/util/Date;->getTime()J

    move-result-wide v12

    const-wide/32 v14, 0x5265c00

    div-long v8, v12, v14

    .line 71
    .local v8, "lt":J
    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v12

    const-wide/32 v14, 0x5265c00

    div-long v2, v12, v14

    .line 72
    .local v2, "ct":J
    sub-long v12, v2, v8

    long-to-int v4, v12

    .line 73
    .local v4, "days":I
    if-nez v4, :cond_d4

    .line 74
    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v12

    invoke-virtual {v10}, Ljava/util/Date;->getTime()J

    move-result-wide v14

    sub-long/2addr v12, v14

    const-wide/32 v14, 0x36ee80

    div-long/2addr v12, v14

    long-to-int v6, v12

    .line 75
    .restart local v6    # "hour":I
    if-nez v6, :cond_bf

    .line 76
    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v12

    invoke-virtual {v10}, Ljava/util/Date;->getTime()J

    move-result-wide v14

    sub-long/2addr v12, v14

    const-wide/32 v14, 0xea60

    div-long/2addr v12, v14

    const-wide/16 v14, 0x1

    invoke-static {v12, v13, v14, v15}, Ljava/lang/Math;->max(JJ)J

    move-result-wide v12

    invoke-virtual {v11, v12, v13}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "\u5206\u949f\u524d"

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    goto/16 :goto_8

    .line 78
    :cond_bf
    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v11, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "\u5c0f\u65f6\u524d"

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    goto/16 :goto_8

    .line 79
    .end local v6    # "hour":I
    :cond_d4
    const/4 v11, 0x1

    if-ne v4, v11, :cond_db

    .line 80
    const-string v5, "\u6628\u5929"

    goto/16 :goto_8

    .line 81
    :cond_db
    const/4 v11, 0x2

    if-ne v4, v11, :cond_e2

    .line 82
    const-string v5, "\u524d\u5929"

    goto/16 :goto_8

    .line 83
    :cond_e2
    const/4 v11, 0x2

    if-le v4, v11, :cond_fe

    const/16 v11, 0xa

    if-gt v4, v11, :cond_fe

    .line 84
    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v11, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "\u5929\u524d"

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    goto/16 :goto_8

    .line 85
    :cond_fe
    const/16 v11, 0xa

    if-le v4, v11, :cond_8

    .line 86
    sget-object v11, Lcom/zuiapps/suite/utils/string/StringUtils;->dateFormater2:Ljava/text/SimpleDateFormat;

    invoke-virtual {v11, v10}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v5

    goto/16 :goto_8
.end method

.method public static getInitialChar(Ljava/lang/String;Z)Ljava/lang/String;
    .registers 11
    .param p0, "strChinese"    # Ljava/lang/String;
    .param p1, "bUpCase"    # Z

    .prologue
    .line 233
    :try_start_0
    new-instance v1, Ljava/lang/StringBuffer;

    invoke-direct {v1}, Ljava/lang/StringBuffer;-><init>()V

    .line 234
    .local v1, "buffer":Ljava/lang/StringBuffer;
    const-string v7, "GBK"

    invoke-virtual {p0, v7}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object v0

    .line 235
    .local v0, "b":[B
    const/4 v5, 0x0

    .local v5, "i":I
    move v6, v5

    .end local v5    # "i":I
    .local v6, "i":I
    :goto_d
    array-length v7, v0

    if-ge v6, v7, :cond_42

    .line 236
    aget-byte v7, v0, v6

    and-int/lit16 v7, v7, 0xff

    const/16 v8, 0x80

    if-le v7, v8, :cond_32

    .line 237
    add-int/lit8 v5, v6, 0x1

    .end local v6    # "i":I
    .restart local v5    # "i":I
    aget-byte v7, v0, v6

    and-int/lit16 v3, v7, 0xff

    .line 238
    .local v3, "char1":I
    shl-int/lit8 v3, v3, 0x8

    .line 239
    aget-byte v7, v0, v5

    and-int/lit16 v7, v7, 0xff

    add-int v4, v3, v7

    .line 240
    .local v4, "chart":I
    int-to-char v7, v4

    invoke-static {v7, p1}, Lcom/zuiapps/suite/utils/string/StringUtils;->getPYIndexChar(CZ)C

    move-result v7

    invoke-virtual {v1, v7}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;

    .line 235
    .end local v3    # "char1":I
    .end local v4    # "chart":I
    :goto_2e
    add-int/lit8 v5, v5, 0x1

    move v6, v5

    .end local v5    # "i":I
    .restart local v6    # "i":I
    goto :goto_d

    .line 244
    :cond_32
    aget-byte v7, v0, v6

    int-to-char v2, v7

    .line 245
    .local v2, "c":C
    invoke-static {v2}, Ljava/lang/Character;->isJavaIdentifierPart(C)Z

    move-result v7

    if-nez v7, :cond_3d

    .line 246
    const/16 v2, 0x41

    .line 248
    :cond_3d
    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;

    move v5, v6

    .end local v6    # "i":I
    .restart local v5    # "i":I
    goto :goto_2e

    .line 251
    .end local v2    # "c":C
    .end local v5    # "i":I
    .restart local v6    # "i":I
    :cond_42
    invoke-virtual {v1}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v7

    sget-object v8, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;

    invoke-virtual {v7, v8}, Ljava/lang/String;->toUpperCase(Ljava/util/Locale;)Ljava/lang/String;
    :try_end_4b
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_4b} :catch_4d

    move-result-object v7

    .line 254
    .end local v0    # "b":[B
    .end local v1    # "buffer":Ljava/lang/StringBuffer;
    .end local v6    # "i":I
    :goto_4c
    return-object v7

    .line 252
    :catch_4d
    move-exception v7

    .line 254
    const/4 v7, 0x0

    goto :goto_4c
.end method

.method private static getPYIndexChar(CZ)C
    .registers 6
    .param p0, "strChinese"    # C
    .param p1, "bUpCase"    # Z

    .prologue
    .line 264
    move v0, p0

    .line 267
    .local v0, "charGBK":I
    const v2, 0xb0a1

    if-lt v0, v2, :cond_14

    const v2, 0xb0c4

    if-gt v0, v2, :cond_14

    .line 268
    const/16 v1, 0x41

    .line 315
    .local v1, "result":C
    :goto_d
    if-nez p1, :cond_13

    .line 316
    invoke-static {v1}, Ljava/lang/Character;->toLowerCase(C)C

    move-result v1

    .line 317
    :cond_13
    return v1

    .line 269
    .end local v1    # "result":C
    :cond_14
    const v2, 0xb0c5

    if-lt v0, v2, :cond_21

    const v2, 0xb2c0

    if-gt v0, v2, :cond_21

    .line 270
    const/16 v1, 0x42

    .restart local v1    # "result":C
    goto :goto_d

    .line 271
    .end local v1    # "result":C
    :cond_21
    const v2, 0xb2c1

    if-lt v0, v2, :cond_2e

    const v2, 0xb4ed

    if-gt v0, v2, :cond_2e

    .line 272
    const/16 v1, 0x43

    .restart local v1    # "result":C
    goto :goto_d

    .line 273
    .end local v1    # "result":C
    :cond_2e
    const v2, 0xb4ee

    if-lt v0, v2, :cond_3b

    const v2, 0xb6e9

    if-gt v0, v2, :cond_3b

    .line 274
    const/16 v1, 0x44

    .restart local v1    # "result":C
    goto :goto_d

    .line 275
    .end local v1    # "result":C
    :cond_3b
    const v2, 0xb6ea

    if-lt v0, v2, :cond_48

    const v2, 0xb7a1

    if-gt v0, v2, :cond_48

    .line 276
    const/16 v1, 0x45

    .restart local v1    # "result":C
    goto :goto_d

    .line 277
    .end local v1    # "result":C
    :cond_48
    const v2, 0xb7a2

    if-lt v0, v2, :cond_55

    const v2, 0xb8c0

    if-gt v0, v2, :cond_55

    .line 278
    const/16 v1, 0x46

    .restart local v1    # "result":C
    goto :goto_d

    .line 279
    .end local v1    # "result":C
    :cond_55
    const v2, 0xb8c1

    if-lt v0, v2, :cond_62

    const v2, 0xb9fd

    if-gt v0, v2, :cond_62

    .line 280
    const/16 v1, 0x47

    .restart local v1    # "result":C
    goto :goto_d

    .line 281
    .end local v1    # "result":C
    :cond_62
    const v2, 0xb9fe

    if-lt v0, v2, :cond_6f

    const v2, 0xbbf6

    if-gt v0, v2, :cond_6f

    .line 282
    const/16 v1, 0x48

    .restart local v1    # "result":C
    goto :goto_d

    .line 283
    .end local v1    # "result":C
    :cond_6f
    const v2, 0xbbf7

    if-lt v0, v2, :cond_7c

    const v2, 0xbfa5

    if-gt v0, v2, :cond_7c

    .line 284
    const/16 v1, 0x4a

    .restart local v1    # "result":C
    goto :goto_d

    .line 285
    .end local v1    # "result":C
    :cond_7c
    const v2, 0xbfa6

    if-lt v0, v2, :cond_89

    const v2, 0xc0ab

    if-gt v0, v2, :cond_89

    .line 286
    const/16 v1, 0x4b

    .restart local v1    # "result":C
    goto :goto_d

    .line 287
    .end local v1    # "result":C
    :cond_89
    const v2, 0xc0ac

    if-lt v0, v2, :cond_97

    const v2, 0xc2e7

    if-gt v0, v2, :cond_97

    .line 288
    const/16 v1, 0x4c

    .restart local v1    # "result":C
    goto/16 :goto_d

    .line 289
    .end local v1    # "result":C
    :cond_97
    const v2, 0xc2e8

    if-lt v0, v2, :cond_a5

    const v2, 0xc4c2

    if-gt v0, v2, :cond_a5

    .line 290
    const/16 v1, 0x4d

    .restart local v1    # "result":C
    goto/16 :goto_d

    .line 291
    .end local v1    # "result":C
    :cond_a5
    const v2, 0xc4c3

    if-lt v0, v2, :cond_b3

    const v2, 0xc5b5

    if-gt v0, v2, :cond_b3

    .line 292
    const/16 v1, 0x4e

    .restart local v1    # "result":C
    goto/16 :goto_d

    .line 293
    .end local v1    # "result":C
    :cond_b3
    const v2, 0xc5b6

    if-lt v0, v2, :cond_c1

    const v2, 0xc5bd

    if-gt v0, v2, :cond_c1

    .line 294
    const/16 v1, 0x4f

    .restart local v1    # "result":C
    goto/16 :goto_d

    .line 295
    .end local v1    # "result":C
    :cond_c1
    const v2, 0xc5be

    if-lt v0, v2, :cond_cf

    const v2, 0xc6d9

    if-gt v0, v2, :cond_cf

    .line 296
    const/16 v1, 0x50

    .restart local v1    # "result":C
    goto/16 :goto_d

    .line 297
    .end local v1    # "result":C
    :cond_cf
    const v2, 0xc6da

    if-lt v0, v2, :cond_dd

    const v2, 0xc8ba

    if-gt v0, v2, :cond_dd

    .line 298
    const/16 v1, 0x51

    .restart local v1    # "result":C
    goto/16 :goto_d

    .line 299
    .end local v1    # "result":C
    :cond_dd
    const v2, 0xc8bb

    if-lt v0, v2, :cond_eb

    const v2, 0xc8f5

    if-gt v0, v2, :cond_eb

    .line 300
    const/16 v1, 0x52

    .restart local v1    # "result":C
    goto/16 :goto_d

    .line 301
    .end local v1    # "result":C
    :cond_eb
    const v2, 0xc8f6

    if-lt v0, v2, :cond_f9

    const v2, 0xcbf9

    if-gt v0, v2, :cond_f9

    .line 302
    const/16 v1, 0x53

    .restart local v1    # "result":C
    goto/16 :goto_d

    .line 303
    .end local v1    # "result":C
    :cond_f9
    const v2, 0xcbfa

    if-lt v0, v2, :cond_107

    const v2, 0xcdd9

    if-gt v0, v2, :cond_107

    .line 304
    const/16 v1, 0x54

    .restart local v1    # "result":C
    goto/16 :goto_d

    .line 305
    .end local v1    # "result":C
    :cond_107
    const v2, 0xcdda

    if-lt v0, v2, :cond_115

    const v2, 0xcef3

    if-gt v0, v2, :cond_115

    .line 306
    const/16 v1, 0x57

    .restart local v1    # "result":C
    goto/16 :goto_d

    .line 307
    .end local v1    # "result":C
    :cond_115
    const v2, 0xcef4

    if-lt v0, v2, :cond_123

    const v2, 0xd1b8

    if-gt v0, v2, :cond_123

    .line 308
    const/16 v1, 0x58

    .restart local v1    # "result":C
    goto/16 :goto_d

    .line 309
    .end local v1    # "result":C
    :cond_123
    const v2, 0xd1b9

    if-lt v0, v2, :cond_131

    const v2, 0xd4d0

    if-gt v0, v2, :cond_131

    .line 310
    const/16 v1, 0x59

    .restart local v1    # "result":C
    goto/16 :goto_d

    .line 311
    .end local v1    # "result":C
    :cond_131
    const v2, 0xd4d1

    if-lt v0, v2, :cond_13f

    const v2, 0xd7f9

    if-gt v0, v2, :cond_13f

    .line 312
    const/16 v1, 0x5a

    .restart local v1    # "result":C
    goto/16 :goto_d

    .line 314
    .end local v1    # "result":C
    :cond_13f
    new-instance v2, Ljava/util/Random;

    invoke-direct {v2}, Ljava/util/Random;-><init>()V

    const/16 v3, 0x19

    invoke-virtual {v2, v3}, Ljava/util/Random;->nextInt(I)I

    move-result v2

    add-int/lit8 v2, v2, 0x41

    int-to-char v1, v2

    .restart local v1    # "result":C
    goto/16 :goto_d
.end method

.method public static inputSteamToString(Ljava/io/InputStream;Ljava/lang/String;)Ljava/lang/String;
    .registers 9
    .param p0, "is"    # Ljava/io/InputStream;
    .param p1, "charset"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    const/16 v6, 0x400

    const/4 v5, 0x0

    .line 198
    const/16 v0, 0x400

    .line 200
    .local v0, "BUFFER_SIZE":I
    new-instance v3, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v3}, Ljava/io/ByteArrayOutputStream;-><init>()V

    .line 201
    .local v3, "outStream":Ljava/io/ByteArrayOutputStream;
    new-array v2, v6, [B

    .line 202
    .local v2, "data":[B
    const/4 v1, -0x1

    .line 204
    .local v1, "count":I
    :goto_d
    invoke-virtual {p0, v2, v5, v6}, Ljava/io/InputStream;->read([BII)I

    move-result v1

    const/4 v4, -0x1

    if-eq v1, v4, :cond_18

    .line 205
    invoke-virtual {v3, v2, v5, v1}, Ljava/io/ByteArrayOutputStream;->write([BII)V

    goto :goto_d

    .line 207
    :cond_18
    const/4 v2, 0x0

    .line 208
    new-instance v4, Ljava/lang/String;

    invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object v5

    invoke-direct {v4, v5, p1}, Ljava/lang/String;-><init>([BLjava/lang/String;)V

    return-object v4
.end method

.method public static isEmail(Ljava/lang/String;)Z
    .registers 2
    .param p0, "email"    # Ljava/lang/String;

    .prologue
    .line 137
    if-eqz p0, :cond_c

    invoke-virtual {p0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v0

    if-nez v0, :cond_e

    .line 138
    :cond_c
    const/4 v0, 0x0

    .line 139
    :goto_d
    return v0

    :cond_e
    sget-object v0, Lcom/zuiapps/suite/utils/string/StringUtils;->emailer:Ljava/util/regex/Pattern;

    invoke-virtual {v0, p0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/regex/Matcher;->matches()Z

    move-result v0

    goto :goto_d
.end method

.method public static isEmpty(Ljava/lang/String;)Z
    .registers 5
    .param p0, "input"    # Ljava/lang/String;

    .prologue
    const/4 v2, 0x1

    .line 118
    if-eqz p0, :cond_b

    const-string v3, ""

    invoke-virtual {v3, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_c

    .line 127
    :cond_b
    :goto_b
    return v2

    .line 121
    :cond_c
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_d
    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v3

    if-ge v1, v3, :cond_b

    .line 122
    invoke-virtual {p0, v1}, Ljava/lang/String;->charAt(I)C

    move-result v0

    .line 123
    .local v0, "c":C
    const/16 v3, 0x20

    if-eq v0, v3, :cond_29

    const/16 v3, 0x9

    if-eq v0, v3, :cond_29

    const/16 v3, 0xd

    if-eq v0, v3, :cond_29

    const/16 v3, 0xa

    if-eq v0, v3, :cond_29

    .line 124
    const/4 v2, 0x0

    goto :goto_b

    .line 121
    :cond_29
    add-int/lit8 v1, v1, 0x1

    goto :goto_d
.end method

.method public static isToday(Ljava/lang/String;)Z
    .registers 7
    .param p0, "sdate"    # Ljava/lang/String;

    .prologue
    .line 98
    const/4 v0, 0x0

    .line 99
    .local v0, "b":Z
    invoke-static {p0}, Lcom/zuiapps/suite/utils/string/StringUtils;->toDate(Ljava/lang/String;)Ljava/util/Date;

    move-result-object v2

    .line 100
    .local v2, "time":Ljava/util/Date;
    new-instance v4, Ljava/util/Date;

    invoke-direct {v4}, Ljava/util/Date;-><init>()V

    .line 101
    .local v4, "today":Ljava/util/Date;
    if-eqz v2, :cond_1f

    .line 102
    sget-object v5, Lcom/zuiapps/suite/utils/string/StringUtils;->dateFormater2:Ljava/text/SimpleDateFormat;

    invoke-virtual {v5, v4}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v1

    .line 103
    .local v1, "nowDate":Ljava/lang/String;
    sget-object v5, Lcom/zuiapps/suite/utils/string/StringUtils;->dateFormater2:Ljava/text/SimpleDateFormat;

    invoke-virtual {v5, v2}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v3

    .line 104
    .local v3, "timeDate":Ljava/lang/String;
    invoke-virtual {v1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_1f

    .line 105
    const/4 v0, 0x1

    .line 108
    .end local v1    # "nowDate":Ljava/lang/String;
    .end local v3    # "timeDate":Ljava/lang/String;
    :cond_1f
    return v0
.end method

.method public static toBool(Ljava/lang/String;)Z
    .registers 2
    .param p0, "b"    # Ljava/lang/String;

    .prologue
    .line 191
    :try_start_0
    invoke-static {p0}, Ljava/lang/Boolean;->parseBoolean(Ljava/lang/String;)Z
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_3} :catch_5

    move-result v0

    .line 194
    :goto_4
    return v0

    .line 192
    :catch_5
    move-exception v0

    .line 194
    const/4 v0, 0x0

    goto :goto_4
.end method

.method public static toDate(Ljava/lang/String;)Ljava/util/Date;
    .registers 4
    .param p0, "sdate"    # Ljava/lang/String;

    .prologue
    const/4 v1, 0x0

    .line 35
    invoke-static {p0}, Lcom/zuiapps/suite/utils/string/StringUtils;->isEmpty(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_8

    .line 40
    :goto_7
    return-object v1

    .line 38
    :cond_8
    :try_start_8
    sget-object v2, Lcom/zuiapps/suite/utils/string/StringUtils;->dateFormater:Ljava/text/SimpleDateFormat;

    invoke-virtual {v2, p0}, Ljava/text/SimpleDateFormat;->parse(Ljava/lang/String;)Ljava/util/Date;
    :try_end_d
    .catch Ljava/text/ParseException; {:try_start_8 .. :try_end_d} :catch_f

    move-result-object v1

    goto :goto_7

    .line 39
    :catch_f
    move-exception v0

    .line 40
    .local v0, "e":Ljava/text/ParseException;
    goto :goto_7
.end method

.method public static toInt(Ljava/lang/Object;)I
    .registers 3
    .param p0, "obj"    # Ljava/lang/Object;

    .prologue
    const/4 v0, 0x0

    .line 164
    if-nez p0, :cond_4

    .line 166
    :goto_3
    return v0

    :cond_4
    invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1, v0}, Lcom/zuiapps/suite/utils/string/StringUtils;->toInt(Ljava/lang/String;I)I

    move-result v0

    goto :goto_3
.end method

.method public static toInt(Ljava/lang/String;I)I
    .registers 3
    .param p0, "str"    # Ljava/lang/String;
    .param p1, "defValue"    # I

    .prologue
    .line 151
    :try_start_0
    invoke-static {p0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_3} :catch_5

    move-result p1

    .line 154
    .end local p1    # "defValue":I
    :goto_4
    return p1

    .line 152
    .restart local p1    # "defValue":I
    :catch_5
    move-exception v0

    goto :goto_4
.end method

.method public static toLong(Ljava/lang/String;)J
    .registers 3
    .param p0, "obj"    # Ljava/lang/String;

    .prologue
    .line 177
    :try_start_0
    invoke-static {p0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_3} :catch_5

    move-result-wide v0

    .line 180
    :goto_4
    return-wide v0

    .line 178
    :catch_5
    move-exception v0

    .line 180
    const-wide/16 v0, 0x0

    goto :goto_4
.end method
